package com.minsu.service.impl;

import com.minsu.entity.ProductionOrder;
import com.minsu.mapper.ProductionOrdersMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class ProductionOrderService {
    @Autowired
    private ProductionOrdersMapper productionOrdersMapper;

    public void addProductionOrder() {
        ProductionOrder productionOrder = new ProductionOrder();
        productionOrder.setProductionOrderNo("PO20241010001");
        productionOrder.setMeltingTemperature(new BigDecimal("1500.50"));
        // 不设置 inTime 字段，让 AOP 自动填充
        productionOrdersMapper.add(productionOrder);
    }
}
